{% extends "index.html" %}

{% block js_content %}
onLoad="remove_unwanted(document.getElementsByName('seter'),document.getElementsByName('comparer'))
{% endblock %}

{% block ip_content %}
<link rel="stylesheet" type="text/css" href="media/css/form.css">

{% if not tcp_id %}
<form action="/iptables/rule/{{rule_id}}/add/tcp/" method="post"  onsubmit="return control_submited_flag(document.getElementsByName('seter'),document.getElementsByName('comparer'))">
{% endif %}

{% if tcp_id %}
<form action="/iptables/rule/{{rule_id}}/edit/tcp/{{tcp_id}}/" method="post"  onsubmit="return control_submited_flag(document.getElementsByName('seter'),document.getElementsByName('comparer'))">
{% endif %}
	<div id="container">
	<div id="kutubaslik"><strong>Tcp Düzenleme Formu</strong></div>	
		<br/>
		<br/>
		<br/>
	<div id="leftcolumn">
	{{form.kaynak_port.label}}:{{form.kaynak_port}}
				
			
			</div>

			<div id="rightcolumn">
			
	{{form.hedef_port.label}}:{{form.hedef_port}}
			
			</div>

	<div id="boxl">
		{{form.seter}}
	</div>
	<div id="boxc">
		{{form.comparer}}
	</div>
	<div id="boxr">
		<div id="forbutonl">
		<p>
		<img src="media/images/1.png" alt="right" onclick="add_flag(document.getElementsByName('thesource'),document.getElementsByName('comparer'))"/>
		</p>		
		<p>
		<img src="media/images/2.png" alt="left" onclick="remove_flag(document.getElementsByName('comparer'))"/>
		</p>

		</div>
		

		<div id="forbutonr">
			<p>
		<img src="media/images/2.png" alt="right" onclick="add_flag(document.getElementsByName('thesource'),document.getElementsByName('seter'))"/>
		</p>		
		<p>
		<img src="media/images/1.png" alt="left" onclick="remove_flag(document.getElementsByName('seter'))"/>
		</p>
		</div>

		<div id="forbutonc">
		<select name="thesource" size="8" multiple="multiple" id="thesource">
                <option value="ALL">ALL</option>
                <option value="SYN">SYN</option>
                <option value="ACK">ACK</option>
                <option value="FIN">FIN</option>
                <option value="RST">RST</option>
                <option value="URG">URG</option>
                <option value="PSH">PSH</option>
                <option value="NONE">NONE</option>
              </select>
		</div>	
	</div>
</div>

</div>


<div align="center"><input type="submit" value="Kaydet"/></div>
		</div>	


</form>

	{% if hatalar%}
		<div id="hata">{{hatalar}}</div>
	{% endif %}

{% if form.errors %}
<div id="hata">
	
	{{form.errors}}

</div>
{% endif %}
</div>

{% endblock %}